///////////user_tab///////////////////////
// int类型： INTEGER,  TINYINT,  SMALLINT,  MEDIUMINT,  BIGINT,  UNSIGNED BIG INT
// 浮点类型： REAL,  DOUBLE  FLOAT
// 文本： TEXT， CHARACTER(20)， VARCHAR(255)， VARYING CHARACTER(255), NCHAR(55),  NATIVE CHARACTER(70)`
// 二进制大对象：BLOB
// DATE:YYYY-MM-DD  DATETIME YYYY-MM-DD HH:MM:SS  TIMESTAMP YYYY-MM-DD HH:MM:SS.SSS

//  拥有表 user_tab_dividing
//
//

/////////// user_tab_dividing ///////////////////////
pub(crate) const USER_CREATE_TAB: &str = r#"CREATE TABLE IF NOT EXISTS user_tab(
    id TEXT PRIMARY KEY,
    name TEXT,
    nickname TEXT,
    phone TEXT NOT NULL,
    password TEXT NOT NULL,
    id_number TEXT,
    header_img TEXT,
    user_state INTEGER,
    create_time INTEGER
)"#;

/* 插入一条数据 */
pub(crate) const USER_INSERT: &str = r#"INSERT INTO user_tab (
    id, name, nickname,phone, password,
    id_number,header_img, user_state,create_time) VALUES (?1, ?2,?3, ?4,?5, ?6, ?7, ?8, ?9)"#;

/* 修改 用户状态*/
pub(crate) const USER_UPDATE_STATE: &str = r#"UPDATE user_tab
    SET user_state = ?1
    WHERE id = ?2"#;

/* 修改密码*/
pub(crate) const USER_UPDATE_PASSWORD: &str = r#"UPDATE user_tab
    SET password = ?1
    WHERE id = ?2"#;

/* 根据id删除 */
pub(crate) const USER_DELETE: &str = r#"DELETE FROM user_tab
    WHERE id = ?1"#;

/* 查询全部数据 */
pub(crate) const USER_SELECT_ALL: &str = r#"SELECT * FROM user_tab"#;

/* 根据id查询 */
pub(crate) const USER_SELECT_BY_ID: &str = r#"SELECT * FROM user_tab
    WHERE id = ?1"#;

/* 根据 手机号 查询 */
pub(crate) const USER_SELECT_BY_PHONE: &str = r#"SELECT * FROM user_tab
    WHERE phone like ?1"#;

/////////// user_tab_dividing ///////////////////////